﻿CREATE PROCEDURE [dbo].[proc_GetCompDeptAll]	
	
AS

--SELECT * FROM (
SELECT CompanyName AS [name],[dwbh]
 FROM [Company]  WHERE [dwbh] IS NOT NULL  ORDER BY dwbh
-- UNION   
-- SELECT [DName] AS [name],bmbh AS dwbh FROM [Department] WHERE bmbh IS NOT NULL
--) AS nb ORDER BY dwbh
RETURN


